package com.iv.durian.cloud.dao;

import com.iv.durian.cloud.Notify;
import com.iv.durian.cloud.dao.mapper.NotifyMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.List;
@Slf4j
@Repository
public class NotifyDao {
    @Autowired
    private NotifyMapper notifyMapper;

    public Notify get(Integer id, Integer userId){
        return notifyMapper.get(id,userId);
    }

    public int add(Notify notify) {
        return notifyMapper.add(notify);
    }

    public int update(Notify notify) {
        return notifyMapper.update(notify);
    }

    public int remove(Integer id) {
        return notifyMapper.remove(id);
    }

    public int count(Notify notify) {
        return notifyMapper.count(notify);
    }

    public List<Notify> list(Integer userId, Integer status, Integer type, Integer offset, Integer limit) {
        return notifyMapper.list(userId, status, type, offset, limit);
    }

}
